package com.csun.cmny.provider.dao;

import com.csun.cmny.provider.dto.OmcOldManBillDto;
import com.csun.cmny.provider.model.domain.OmcOldManBill;
import com.csun.cmny.provider.model.dto.cycle.OldmanFixedQueryDto;
import com.csun.cmny.provider.model.vo.cycle.OldmanBillVo;
import com.csun.cmny.provider.vo.*;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface OmcOldManBillMapper extends Mapper<OmcOldManBill> {

    /**
     * 根据老人姓名查询账单列表
     * @param omcOldManBillDto
     * @return
     */
    List<OmcOldManBillVo> selectBillByName(OmcOldManBillDto omcOldManBillDto);

    /**
     * 根据账单ID查询账单详情
     * @param omcOldManBillDto
     * @return
     */
    OmcOldManBillDetailVo selectBillByKey(OmcOldManBillDto omcOldManBillDto);

    /**
     * query oldman check in bill id
     *
     * @param oldmanId the oldman id
     *
     * @return the oldman check in bill id the last time
     */
    Long queryOldmanCheckInBillId(Integer oldmanId);

    /**
     * 查询未审批的缴费单
     * @param: [omcOldManBillDto]
     * @return: java.util.List<com.csun.cmny.provider.vo.OmcOldManBillVo>
     */
    List<OmcOldManBillVo> queryNeedApproveListWithPage(OmcOldManBillDto omcOldManBillDto);

    /**
     * query fixed list by oldman id list and date
     *
     * @param oldmanFixedQueryDto
     *
     * @return
     */
    List<OldmanBillVo> queryFixedListByOldmanIdListAndDate(OldmanFixedQueryDto oldmanFixedQueryDto);
    /*
     * 集团化缴费记录单查询
     * */
    List<OldmanBillInforVo> selectAllBill(@Param("oldmanbill") OldmanBillInforVo oldmanbill,@Param("groupIdList") List<Long> groupIdList);
    /*
     * 营业额报表查询
     * */
    List<TurnoverVo> selectTurnover(@Param("turnoverVo") TurnoverVo turnoverVo,@Param("groupIdList") List<Long> groupIdList);

    List<MonthToTurnoverVo> selectTurnoverByMonth(@Param("turnoverVo") TurnoverVo turnoverVo,@Param("groupIdList") List<Long> groupIdList);
}